<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>后台登录界面</title>
</head>
<body>

    <center>
        <h2>后台登录界面</h2>

        <form action="${ctx}/user" method="post">

            <input type="hidden" name="method" value="login"/>
            <label for="username">用户名: </label>
            <input type="text" id="username" name="username" placeholder="请输入用户名" /><br/>

            <label for="password">密码: </label>
            <input type="text" id="password" name="password" placeholder="请输入密码" /><br/>

            <label for="verifyCode">验证码: </label>
            <input type="text" id="verifyCode" name="checkCode" placeholder="请输入验证码" />
            <img id="verifyCodeImg" src="${ctx}/verifyCode" onclick="changeCheckCode();"/>
            <a href="javascript:void(0);" onclick="changeCheckCode();">看不清楚，换一张</a><br/>

            <input type="submit" value="登录"/>
        </form>

    </center>


</body>

<script>
    function changeCheckCode() {
        document.getElementById("verifyCodeImg").src = "${ctx}/verifyCode?time=" + new Date().getTime();
    }
</script>

</html>
